home *** CD-ROM | disk | FTP | other *** search
/ Asymetrix Multimedia Creative Suite / Asymetrix Multimedia Creative Suite.iso / compel / cpl2dsk.inf < prev    next >
INI File  |  1995-02-02  |  66KB  |  2,069 lines

  1. ;; SETUP SCRIPT TEMPLATE FILE COMPEL.INF
  2. ;;  Compatible with:  INSTALIT/W version 3.0 and higher
  3. ;;  Shipped as script version 1.0a
  4.  
  5. ;;  Designed for general use with products offering three optional
  6. ;;  modules and possibly requiring basic changes to AUTOEXEC.BAT
  7. ;;  and/or CONFIG.SYS.  Reads a Script Data File in order to adapt
  8. ;;  to the job at hand.
  9.  
  10. DefineVariables
  11. Directory [SDFFileName] := compel20.sdf
  12. ;; following variables are initialized from external Script Data File
  13. SDF Text [CompanyName]
  14. SDF Text [ProductName]
  15. SDF Directory [DefaultInstallationDir]
  16. SDF Text [ModifyMode]
  17. SDF Directory [ReadmeFileName]
  18. SDF Logical [InquireSysFileLocation]
  19. SDF Logical [AskBeforeFileReplace]
  20. SDF Logical [CDInstall]
  21. SDF Text [MinimumOSVersion]
  22. SDF Text [DOS401]
  23. SDF Text [MinimumWinVersion]
  24. SDF Number [MinMemRequiredPresent]
  25. SDF Number [MinExtMemoryRequired]
  26. SDF Number [WinVideoSize]
  27. SDF Number [OLESize]
  28. SDF Text [InstallingLanguage]
  29. SDF Logical [AllowCGA]
  30. SDF Logical [AllowEGA]
  31. SDF Logical [AllowMDA]
  32. SDF Logical [Allow808x]
  33. SDF Logical [Allow80286]
  34. SDF Logical [MathCoproRecommended]
  35. SDF Logical [FixedDiskRequired]
  36. SDF Text [NetWorkInstallation]
  37. SDF Text [PopupBorder]
  38. SDF Text [Module1Name]
  39. SDF Text [Module1Groups]
  40. SDF Text [Module2Name]
  41. SDF Text [Module2Groups]
  42. SDF Text [Module2aGroups]
  43. SDF Text [Module3Name]
  44. SDF Text [Module3Groups]
  45. SDF Text [Module4Name]
  46. SDF Text [Module4Groups]
  47. SDF Text [Module5Name]
  48. SDF Text [Module5Groups]
  49. SDF Text [Module6Name]
  50. SDF Text [Module6Groups]
  51. SDF Text [Module7Name]
  52. SDF Text [Module7Groups]
  53. SDF Text [Module8Name]
  54. SDF Text [Module8Groups]
  55. SDF Text [Module9Name]
  56. SDF Text [Module9Groups]
  57. SDF Text [Module10Name]
  58. SDF Text [Module10Groups]
  59. SDF Text [MediaGroup1]
  60. SDF Text [MediaGroup2]
  61. SDF Text [MediaGroup3]
  62. SDF Text [MediaGroup4]
  63. SDF Text [MediaGroup5]
  64. SDF Text [MediaGroup6]
  65. SDF Text [MediaGroup7]
  66. SDF Text [MediaGroup8]
  67. SDF Text [MediaGroup9]
  68. SDF Number [MediaSize1]
  69. SDF Number [MediaSize2]
  70. SDF Number [MediaSize3]
  71. SDF Number [MediaSize4]
  72. SDF Number [MediaSize5]
  73. SDF Number [MediaSize6]
  74. SDF Number [MediaSize7]
  75. SDF Number [MediaSize8]
  76. SDF Number [MediaSize9]
  77. SDF Text [AutodeskGroup]
  78. SDF Text [MediaRoot]
  79. SDF Text [FullDesc]
  80. SDF Text [FullDesc2]
  81. SDF Text [CustomDesc]
  82. SDF Text [CustomDesc2]
  83. SDF Text [ReplaceDesc]
  84. SDF Text [MediaClipText]
  85. SDF Text [ExtractionOptions]
  86. SDF Text [MBInstText]
  87. SDF Text [OLE2ver]
  88. SDF Text [OLE2NLSver]
  89. SDF Text [OLE2DISPver]
  90. SDF Text [OLE2PROXver]
  91. SDF Text [OLE2CONVver]
  92. SDF Text [COMPOBJver]
  93. SDF Text [STORAGEver]
  94. SDF Text [TYPELIBver]
  95. ;; remaining variables are not initialized from external Script Data File
  96. Number [FilterSize] := 0
  97. Logical [Installed] := NoCharacter
  98. Logical [ASYMini] := NoCharacter
  99. Logical [ISGDI9dll] := NoCharacter
  100. Logical [ISGDI9ini] := NoCharacter
  101. Logical [Modified] := NoCharacter
  102. Logical [DoDrivers] := NoCharacter
  103. Logical [ExesInstalled] := NoCharacter
  104. Logical [FiltersInstalled] := NoCharacter
  105. Logical [ScorePlayerInstalled] := NoCharacter
  106. Logical [GetOneFile] := NoCharacter
  107. Logical [InsufficientSystem] := NoCharacter
  108. Logical [CompatNoticeGiven] := NoCharacter
  109. Logical [RuntimeInstalled] := NoCharacter
  110. Logical [DefaultTemplate16] := YesCharacter
  111. Logical [UpdateOLE] := NoCharacter
  112. Logical [MediaInstalled] := NoCharacter
  113. Logical [TemplatesInstalled] := NoCharacter
  114. Logical [ColorsInstalled] := NoCharacter
  115. Logical [FormsInstalled] := NoCharacter
  116. Logical [TourInstalled] := NoCharacter
  117. Logical [ToolsInstalled] := NoCharacter
  118. Directory [MediaDest]
  119. Text [DisplayAdapterSummary]
  120. Text [CPUTypeSummary]
  121. Text [NetworkActive]
  122. Text [MathCoprocessorStatus]
  123. Text [InstDriveSummary]
  124. Text [OSVersionSummary]
  125. Text [WinVersionSummary]
  126. Text [SystemMemorySummary]
  127. Text [ExtMemorySummary]
  128. Text [UserName]
  129. Text [Organization]
  130. Text [CModified]
  131. Text [AModified]
  132. Text [BackgroundColor] := 64 0 128 0 64 64 TopToBottom
  133. Text [ScreenColors] := BlackOnWhite
  134. EndDefineVariables
  135.  
  136. ;; Set up basic screen appearance since there will be a brief delay
  137. ;; before the external data is ready to use
  138. SetMouseCursor Wait
  139. Do SetupInstalit
  140.  
  141. [YesOrNo1] := IsFileInUse cpl20.exe
  142. If [YesOrNo1] = NoCharacter
  143.     [YesOrNo1] := IsFileInUse cpl20shw.exe
  144. EndIf
  145. If [YesOrNo1] = YesCharacter
  146.     SetMouseCursor Arrow
  147.     MessageBox [YesOrNo1] OkCancel Exclamation
  148.         Setup has detected a copy of [ProductName] currently running on your system.
  149.         Please shut this copy down and click OK to continue installing, or Cancel to quit.
  150.     EndMessageBox
  151.     If [YesOrNo1] = YesCharacter
  152.         Do SimpleExit
  153.     EndIf
  154. EndIf
  155.  
  156. Do BetaSave
  157. Do PrepareSystemReport
  158. Do CheckOLE
  159.  
  160. SetReplacementInquiry On
  161. If [CommandLine1] = -ReplaceFiles
  162.     SetReplacementInquiry Off
  163. EndIf
  164. If [CommandLine2] = -ReplaceFiles
  165.     SetReplacementInquiry Off
  166. EndIf
  167. If [CommandLine3] = -ReplaceFiles
  168.     SetReplacementInquiry Off
  169. EndIf
  170.  
  171. If [InquireSysFileLocation] = NoCharacter
  172.     If DriveIsPresent [BootDrive]  ;; if not, COMSPEC has been changed
  173.         NoSysFileConfirmation
  174.     EndIf
  175. EndIf
  176.  
  177. If [AskBeforeFileReplace] = NoCharacter
  178.     SetReplacementInquiry Off
  179. EndIf
  180.  
  181. ;; We're ready to go now, so hide the bitmap in the middle of the screen
  182. ;; and show the one in the upper left corner.
  183. HideBitMap 2
  184. ShowBitMap 1 @xy(10,10)
  185. UnloadBitmap 2
  186.  
  187. ;; This information gets written to compel.ini.  Let's look and see if this
  188. ;; information already exists there so we can initialize the edit controls.
  189. [String2] := [WindowsDirectory]\compel.ini
  190. If FileExists [String2]
  191. Else
  192.     [String2] := [WindowsDirectory]\cpl20.ini
  193.     If FileExists [String2]
  194.     Else
  195.         [String2] := BlankString
  196.     EndIf
  197. EndIf
  198. [String9] := A[String2]
  199. If [String9] <> A
  200.     [Array1][1] := User Information
  201.     [Array1][2] := Name
  202.     [Array1][3] := default
  203.     [Array1][4] := [String2]
  204.     GetPrivateProfileString Using [Array1]
  205.     [String1] := [Array1][5]
  206.     If [String1] = default
  207.         [UserName] := BlankString
  208.     Else
  209.         [UserName] := [Array1][5]
  210.     EndIf
  211.  
  212.     [Array1][1] := User Information
  213.     [Array1][2] := Organization
  214.     [Array1][3] := default
  215.     [Array1][4] := [String2]
  216.     GetPrivateProfileString Using [Array1]
  217.     [String1] := [Array1][5]
  218.     If [String1] = default
  219.         [Organization] := BlankString
  220.     Else
  221.         [Organization] := [Array1][5]
  222.     EndIf
  223. Else
  224.     [UserName] := BlankString
  225.     [Organization] := BlankString
  226. EndIf
  227. SetMouseCursor Arrow
  228. GetUserInfo UseHeader "Introduce yourself" Instructions "Please personalize your copy of Compel."
  229.     Name
  230.     ;[UserName]
  231.     Organization
  232.     ;[Organization]
  233. EndGetUserInfo
  234.  
  235. ;; This is where the main menu starts.  We will return here after we're done
  236. ;; with some steps, or if the user changes his mind.
  237. :GoAgain
  238. If [InstallationDirectory] = BlankString
  239.     [String1] := SubstringOf [WindowsDirectory] from 1 to 1
  240.     [InstallationDirectory] := [String1]:[DefaultInstallationDir]
  241. EndIf
  242. [MediaDest] := [InstallationDirectory]\media
  243. SetMouseCursor Arrow
  244.  
  245. ;; Find out what the user wants to do...
  246. ;; ...and then do it.
  247.  
  248. GetMenuChoice Graphic Instructions "Press a button to choose the type of installation."
  249.     Complete Installation - [FullDesc] [FullDesc2]
  250.     ;express
  251.     Custom Installation - [CustomDesc] [CustomDesc2]
  252.     ;custom
  253.     File Replacement - [ReplaceDesc]
  254.     ;onefile
  255. EndGetMenuChoice
  256. ClearScreen
  257. InCase choice is
  258.     =1:     QueAllFiles
  259.         [ExesInstalled] := YesCharacter
  260.         [RuntimeInstalled] := YesCharacter
  261.         [FiltersInstalled] := YesCharacter
  262.         [DoDrivers] := YesCharacter
  263.         [ScorePlayerInstalled] := NoCharacter
  264.         [MediaInstalled] := YesCharacter
  265.         [TemplatesInstalled] := YesCharacter
  266.         [ColorsInstalled] := YesCharacter
  267.         [FormsInstalled] := YesCharacter
  268.         [ToolsInstalled] := YesCharacter
  269. ;;                      UnQueFileGroup [AutodeskGroup]
  270.     =2:     Do SelectForCustomSetup
  271.     =3:     Do GetNewCopyOfFile
  272.     =4:     Do ExitInstallation
  273. EndInCase
  274.  
  275. ;; If nothing got queued after we did what the user wanted, let's start over.
  276. If QueSize = 0
  277.     GoTo Continue
  278. EndIf
  279.  
  280. ;;Popup QueSize
  281. ;; Will the user be able to run this program after it is installed?
  282. If [InsufficientSystem] = YesCharacter
  283.     MessageBox [YesOrNo1] YesNo Question
  284.         Analysis of your system has determined that it is
  285.         not compatible with [ProductName].  For a complete
  286.         summary, press YesCharacter.
  287.  
  288.         Do you wish to continue anyway?
  289.     EndMessageBox
  290.     If [YesOrNo1] = NoCharacter
  291.         Do ExitInstallation
  292.     Else
  293.         Do ShowSystemSummary
  294.     EndIf
  295. EndIf
  296.  
  297. :GetDest
  298. ;; We'll default to drive of Windows directory, since in general it's safe.
  299. If [InstallationDirectory] = BlankString
  300.     [String1] := SubstringOf [WindowsDirectory] from 1 to 1
  301.     [InstallationDirectory] := [String1]:[DefaultInstallationDir]
  302. EndIf
  303. ;; Let's remember what it was in case the user cancels.
  304. [Dir1] := [InstallationDirectory]
  305.  
  306. DialogWithBrowse [InstallationDirectory]
  307.     Setup will install [CompanyName] [ProductName] into the following directory, which
  308.     it will create on your hard disk.  To install Compel in a
  309.     different dirctory or drive, type the name of the directory
  310.     you want, or press Browse.
  311. EndDialogWithBrowse
  312.  
  313. :InstallItAll
  314. If [InstallationDirectory] = BlankString
  315.     [InstallationDirectory] := [Dir1]
  316.     UnQueAllFiles
  317. EndIf
  318.  
  319. Do CheckSpace
  320. If QueSize = 0
  321.     GoTo Continue
  322. EndIf
  323. ;; Let's see if we have enough space...
  324. [Number1] := FreeSpaceOnDrive InstallationDrive
  325. If QueSize > [Number1]
  326.     [String1] := SubstringOf [InstallationDirectory] from 1 to 2
  327.     MessageBox [YesOrNo1] YesNo Question
  328.         There is insufficient space on drive [String1] for
  329.         this installation.
  330.  
  331.         Try another destination?
  332.     EndMessageBox
  333.     If [YesOrNo1] = YesCharacter
  334.         GoTo GetDest
  335.     Else
  336.         [InstallationDirectory] := c:[DefaultInstallationDir]
  337.         UnQueAllFiles
  338.         GoTo Continue
  339.     EndIf
  340. EndIf
  341.  
  342. ;; Once we get a destination, let's make sure there isn't another copy
  343. ;; there.  If there is, let's start over by checking the version...
  344. [String2] := [InstallationDirectory]\cpl20.exe
  345. If FileExists [String2]
  346.     ;; Are they different languages?
  347.     [YesOrNo3] := NoCharacter
  348.     [String3] := BlankString
  349.     [String3] := ProductLanguageOf [String2]
  350.     [String9] := A[String3]
  351.     If [String9] <> A
  352.         If [String3] <> [InstallingLanguage]
  353.             [YesOrNo3] := YesCharacter
  354.         EndIf
  355.     EndIf
  356.  
  357.     ;; Is it older or newer?
  358.     [String1] := ProductVersionOf [String2]
  359.     [String2] := StripFilename [String2]
  360.  
  361.     ;; If there is no version stamp, or if the version is less than the
  362.     ;; installing version, we're installing a newer version.  This works
  363.     ;; provided only older versions of this product have no version stamping.
  364.     [YesOrNo1] := NoCharacter
  365.     [String9] := A[String1]
  366.     If [String9] = A
  367.     Else
  368.         If [String1] < [InstallingVersion]
  369.             [YesOrNo1] := YesCharacter
  370.         EndIf
  371.     EndIf
  372.  
  373.     ;; So if it's older...
  374.     If [YesOrNo1] = YesCharacter
  375.         If [YesOrNo3] = YesCharacter
  376.             [String4] := An older [String3]
  377.         Else
  378.             [String4] := An older
  379.         EndIf
  380.     Else
  381.         ;; ...newer...
  382.         If [String1] > [InstallingVersion]
  383.             If [YesOrNo3] = YesCharacter
  384.                 [String4] := A newer [String3]
  385.             Else
  386.                 [String4] := A newer
  387.             EndIf
  388.         Else
  389.             ;;  ...or the same...
  390.             If [YesOrNo3] = YesCharacter
  391.                 [String4] := A(n) [String3]
  392.             Else
  393.                 [String4] := Another
  394.             EndIf
  395.         EndIf
  396.     EndIf
  397.  
  398.     [String4] := [String4] version of [ProductName] exists on your
  399.     [String5] := system in the [String2] directory.  Do you want to:
  400.     [Number2] := 1003
  401.     SetMouseCursor Arrow
  402.     DialogResource Duplicate Returns [Number1]
  403.         StaticText 1000    Uses [String4]
  404.         StaticText 1001    Uses [String5]
  405.         RadioButtonGroup 1002 to 1003 Uses [Number2]
  406.     EndDialogResource
  407.     ;; If the user OK'ed...
  408.     If [Number1] = 1
  409.         If [Number2] = 1002
  410.             ;; If the user wants to overwrite, install to dir in [String2]
  411.             ;; and fall through.
  412.             [InstallationDirectory] := [String2]
  413.         Else
  414.             ;; Else, they want a new destination
  415.             GoTo GetDest
  416.         EndIf
  417.     Else
  418.         ;; If they canceled, start over at main menu.
  419.         If [Number1] = 1259       ;; IDEXIT defined in instrc.h
  420.             UnQueAllFiles
  421.             GoTo GoAgain
  422.         EndIf
  423.     EndIf
  424. EndIf
  425.  
  426. ;; Install whatever got queued
  427. ;;If FileExists [InstallationDirectory]\install.log
  428. ;;    DeleteFiles from [InstallationDirectory] Quietly
  429. ;;        install.log
  430. ;;    EndDeleteFiles
  431. ;;EndIf
  432. SetLogFileTo [InstallationDirectory]\install.log
  433. Logging On
  434. ;;Do BitmapQuedFiles
  435. GetQuedFiles [ExtractionOptions]
  436.  
  437. If [DoDrivers] = YesCharacter
  438.     Do InstallDrivers
  439. EndIf
  440.  
  441. SetMouseCursor Wait
  442. ClearScreen
  443.  
  444. ;; Some files were selected but not installed if <> 0
  445. If QueSize <> 0
  446.     [Installed] := NoCharacter
  447.  
  448.     ;; Remove files not installed from queue
  449.     UnQueAllFiles
  450.     ;; Message when unable to get all necessary files
  451.     SetMouseCursor Arrow
  452.     MessageBox Exclamation
  453.         Unable to successfully complete this option.
  454.     EndMessageBox
  455. Else
  456.     [Installed] := YesCharacter
  457.     ;; If all we did was get one file, we don't want to write the INI files
  458.     ;; or make a progman group.
  459.     If [GetOneFile] = NoCharacter
  460.         TextBox @xy(Center,Center)
  461.             Writing to initialization files.
  462.             One moment...
  463.         EndTextBox
  464.         Do WriteAsymIni
  465.         Do WriteCompelIni
  466.         Do WriteWinIni
  467.         ClearScreen
  468.     EndIf
  469. EndIf
  470. SetMouseCursor Arrow
  471.  
  472. If [ExesInstalled] = YesCharacter
  473. ;;      OLE 2.0 requires file locking.  OLE 2.0 applications must set SHARE.EXE locking parameters at setup when installing on
  474. ;;a Windows 3.1 system.  Windows for Workgroups has dynamic file locking, which does not require parameter setting, so
  475. ;;SHARE.EXE should not be installed on a Windows for Workgroups machine.
  476. ;;      Parameter settings for machines not running MS-DOS 4.01:
  477. ;;              The following line must appear at the top of the user's AUTOEXEC.BAT:
  478. ;;                      {path to DOS directory}\SHARE.EXE /L:500 /F:5100
  479. ;;      Parameter settings for machines running MS-DOS 4.01:
  480. ;;              The following line must appear in the user's CONFIG.SYS:
  481. ;;                      INSTALL={path to DOS directory}\SHARE.EXE [/F:500] [/L:5100]
  482.  
  483.     [CModified] := BlankString
  484.     [AModified] := BlankString
  485.  
  486.     If FileExists [BootDrive]:\autoexec.bat
  487.         ExamineTextFile [BootDrive]:\autoexec.bat
  488.         [String1] := LineWith (,SHARE.EXE,)
  489.         ForgetTextFile
  490.     EndIf
  491.     [String9] := A[String1]
  492.     If [String9] = A
  493.         If FileExists [BootDrive]:\config.sys
  494.             ExamineTextFile [BootDrive]:\config.sys
  495.             [String1] := LineWith (,SHARE.EXE,)
  496.             ForgetTextFile
  497.         EndIf
  498.     EndIf
  499.     [String9] := A[String1]
  500.     If [String9] = A
  501.         If FileExists [WindowsDirectory]\system.ini
  502.             ExamineTextFile [WindowsDirectory]\system.ini
  503.             [String1] := lineWith (device=vshare,,)
  504.             ForgetTextFile
  505.         EndIf
  506.     EndIf
  507.     [String9] := A[String1]
  508.     If [String9] = A
  509.         MessageBox [YesOrNo1] YesNo Question
  510.             Asymetrix Compel requires either Windows for Workgroups or SHARE.EXE.
  511.             If you are not using Windows for Workgroups, you must run SHARE.EXE.
  512.  
  513.             Would you like Setup to add SHARE.EXE to your AUTOEXEC.BAT?
  514.         EndMessageBox
  515.     Else
  516.         [YesOrNo1] := NoCharacter
  517.     EndIf
  518.  
  519.     SetMouseCursor Wait
  520.     If [YesOrNo1] = YesCharacter
  521.         [CommandLine1] := FullPathTo SHARE.EXE Quietly Search AllFixed
  522.         If [CommandLine1] <> BlankString
  523.             [CommandLine1] := [CommandLine1] /L:500 /F:5100
  524.             If OSVersion = [DOS401]
  525.                 
  526.                 [CommandLine1] := INSTALL=[CommandLine1]
  527.                 ModifyConfigSys Quietly
  528.                     AddOrChangeLineWith (,SHARE.EXE,) as "[CommandLine1]" At Beginning
  529.                 EndModifyConfigSys
  530.                 [CModified] := config.sys
  531.             Else
  532.                 ModifyAutoexecBat Quietly
  533.                     AddOrChangeLineWith (,SHARE.EXE,) as "[CommandLine1]" At Beginning
  534.                 EndModifyAutoexecBat
  535.                 [AModified] := autoexec.bat
  536.             EndIf
  537.             [Modified] := YesCharacter
  538.         EndIf 
  539.     EndIf
  540.     SetMouseCursor Arrow
  541.  
  542.     MessageBox [YesOrNo1] YesNo Question
  543.         Would you like to add
  544.         [InstallationDirectory]
  545.         to your path?
  546.     EndMessageBox
  547.  
  548.     If [YesOrNo1] = YesCharacter
  549.         ModifyAutoexecBat
  550.             AddPathComponent [InstallationDirectory] at End  ;; or "at Beginning"
  551.         EndModifyAutoexecBat
  552.         [AModified] := autoexec.bat
  553.         [Modified] := YesCharacter
  554.     EndIf
  555.  
  556.     If [UpdateOLE] = YesCharacter
  557.         SetMouseCursor Wait
  558.         Run [WindowsSystemDirectory]\regedit.exe /s ole2.reg
  559.         Run [WindowsSystemDirectory]\regedit.exe /s cleanup.reg
  560.         SetMouseCursor Arrow
  561.     EndIf
  562. EndIf
  563.  
  564. If ([ExesInstalled] = Y) .OR. ([RuntimeInstalled] = Y) .OR. ([ToolsInstalled] = Y)
  565.     MessageBox [YesOrNo1] YesNo Question
  566.         Would you like Setup to build
  567.         a Program Manager group?
  568.     EndMessageBox
  569.     If [YesOrNo1] = YesCharacter
  570.         Do BuildProgmanGroup
  571.     EndIf
  572. EndIf
  573.  
  574. :Continue
  575. [GetOneFile] := NoCharacter
  576. [ExesInstalled] := NoCharacter
  577. [FiltersInstalled] := NoCharacter
  578. [RuntimeInstalled] := NoCharacter
  579. [MediaInstalled] := NoCharacter
  580. [TemplatesInstalled] := NoCharacter
  581. [ColorsInstalled] := NoCharacter
  582. [FormsInstalled] := NoCharacter
  583. [DoDrivers] := NoCharacter
  584. GoTo GoAgain
  585. ;; EndMain
  586.  
  587.  
  588. Procedure InstallDrivers
  589.  
  590.     Dialog [YesOrNo1] UseHeader "[DefaultTitle]"
  591.         Would you like to install Video for Windows 1.1?
  592.     EndDialog
  593.  
  594.     If [YesOrNo1] = YesCharacter
  595.         [Dir1] := [InstallationDirectory]
  596.         [InstallationDirectory] := [WindowsSystemDirectory]
  597.  
  598.         [Number10] := FreeSpaceOnDrive InstallationDrive
  599.         If [WinVideoSize] > [Number10]
  600.             [String1] := SubstringOf [InstallationDirectory] from 1 to 2
  601.             MessageBox Exclamation
  602.                 There is insufficient space on drive [String1] to install
  603.                 these drivers.
  604.  
  605.                 You must free approximately [WinVideoSize] bytes on this drive,
  606.                 and try installing again.
  607.             EndMessageBox
  608.             [InstallationDirectory] := [Dir1]
  609.             Exit
  610.         EndIf
  611.         [InstallationDirectory] := [Dir1]
  612.         
  613.         If [CDInstall] = YesCharacter
  614.             If FileExists [InstallFromDirectory]\winvideo\disk1\vfwsetup.exe
  615.                 ShowWindow Minimized
  616.                 Run [InstallFromDirectory]\winvideo\disk1\vfwsetup.exe
  617.                 ShowWindow Maximized
  618.             EndIf
  619.         Else
  620.             If DriveIsRemoveable [InstallFromDrive]
  621.                 ;; The string here "Compel Disk 8" is the string that MediaBuilder
  622.                 ;; put on the disk, and appears in the PVD by the NewSeries item.
  623.                 Dialog PressAKey
  624.                     Please insert the disk labeled "Compel 2.0 Disk 8" in drive [InstallFromDrive]
  625.                 EndDialog
  626.                 VerifyCorrectMedia [InstallFromDrive] Compel Disk 8 filename = vfwsetup.exe
  627.                 If FileExists [InstallFromDrive]:vfwsetup.exe
  628.                     ShowWindow Minimized
  629.                     Run [InstallFromDrive]:vfwsetup.exe
  630.                     ShowWindow Maximized
  631.                 EndIf
  632.             Else
  633.                 [String1] := [InstallFromDirectory]
  634. :GetDir1
  635.                 Dialog [String1] 63 UseHeader "[DefaultTitle]" UpperCase
  636.                     Please enter the location where the
  637.                     files from Disk 8 can be found.
  638.                     Leave blank to exit.
  639.                 EndDialog
  640.                 [String9] := A[String1]
  641.                 If [String9] = A
  642.                     Exit
  643.                 EndIf
  644.  
  645.                 [Number1] := LengthOf [String1]
  646.                 [String2] := SubstringOf [String1] from [Number1] to End
  647.                 [String3] := \
  648.                 If [String2] <> [String3]
  649.                     [String1] := [String1]\
  650.                 EndIf
  651.                 If FileExists [String1]vfwsetup.exe
  652.                     ShowWindow Minimized
  653.                     Run [String1]vfwsetup.exe
  654.                     ShowWindow Maximized
  655.                 Else
  656.                     [String2] := StrLower [String1]
  657.                     MessageBox Exclamation
  658.                         Could not find Video for Windows setup in
  659.                         [String2]
  660.                     EndMessageBox
  661.                     GoTo GetDir1
  662.                 EndIf
  663.             EndIf
  664.         EndIf
  665.     EndIf
  666. EndProcedure
  667.  
  668. Procedure MediaClipInstall
  669. :NewCombo
  670.     [Number1] := [MediaSize1]
  671.     [Number2] := [MediaSize2]
  672.     [Number3] := [MediaSize3]
  673.     [Number4] := [MediaSize4]
  674.     [Number5] := [MediaSize5]
  675.     [Number6] := [MediaSize6]
  676.     [Number7] := [MediaSize7]
  677.     [Number8] := [MediaSize8]
  678.     CheckBoxDialog [MediaDest] UseHeader "Media File Options"
  679.         Instructions
  680.         ;Select a destination directory and the media files you want
  681.         ;to install.  When you are done, press OK to continue, or Cancel
  682.         ;to return to the main menu.  For details about these options,
  683.         ;see the Compel Guide to Clip Art and Clip Media.
  684.         [MediaGroup1]
  685.         ;[Number1]
  686.         [MediaGroup2]
  687.         ;[Number2]
  688.         [MediaGroup3]
  689.         ;[Number3]
  690.         [MediaGroup4]
  691.         ;[Number4]
  692.         [MediaGroup5]
  693.         ;[Number5]
  694.         [MediaGroup6]
  695.         ;[Number6]
  696.         [MediaGroup7]
  697.         ;[Number7]
  698.         [MediaGroup8]
  699.         ;[Number8]
  700.     EndCheckBoxDialog
  701.     [Number10] := [Number1]  + [Number2] + [Number3] + [Number4] + [Number5]
  702.     [Number10] := [Number10] + [Number6] + [Number7] + [Number8]
  703.     If [Number10] = 0
  704.         Exit
  705.     EndIf
  706.     [Dir1] := [InstallationDirectory]
  707.     [InstallationDirectory] := [MediaDest]
  708.     [Number9] := FreeSpaceOnDrive
  709.     [InstallationDirectory] := [Dir1]
  710.     If [Number10] > [Number9]
  711.         [String1] := SubstringOf [MediaDest] from 1 to 2
  712.         MessageBox [YesOrNo1] YesNo Question
  713.             There is insufficient space on drive [String1] for
  714.             this installation.
  715.  
  716.             Try a different destination or combination of files?
  717.         EndMessageBox
  718.         If [YesOrNo1] = YesCharacter
  719.             GoTo NewCombo
  720.         Else
  721.             GoTo Continue
  722.         EndIf
  723.     EndIf
  724.     If [Number1] > 0
  725.         CopyFiles from [InstallFromDrive]:[MediaRoot]\anim to [MediaDest]\anim
  726.             *.*
  727.         EndCopyFiles
  728.     EndIf
  729.     If [Number2] > 0
  730.         CopyFiles from [InstallFromDrive]:[MediaRoot]\music\16bit to [MediaDest]\music\16bit
  731.             *.*
  732.         EndCopyFiles
  733.         CopyFiles from [InstallFromDrive]:[MediaRoot]\music\8bit to [MediaDest]\music\8bit
  734.             *.*
  735.         EndCopyFiles
  736.         CopyFiles from [InstallFromDrive]:[MediaRoot]\mzcacnt to [MediaDest]\mzcacnt
  737.             *.*
  738.         EndCopyFiles
  739.     EndIf
  740.     If [Number3] > 0
  741.         CopyFiles from [InstallFromDrive]:[MediaRoot]\music\midi to [MediaDest]\music\midi
  742.             *.*
  743.         EndCopyFiles
  744.     EndIf
  745.     If [Number4] > 0
  746.         CopyFiles from [InstallFromDrive]:[MediaRoot]\soundfx to [MediaDest]\soundfx
  747.             *.*
  748.         EndCopyFiles
  749.     EndIf
  750.     If [Number5] > 0
  751.         CopyFiles from [InstallFromDrive]:[MediaRoot]\video\ms_video to [MediaDest]\video\ms_video
  752.             *.*
  753.         EndCopyFiles
  754.     EndIf
  755.     If [Number6] > 0
  756.         CopyFiles from [InstallFromDrive]:[MediaRoot]\video\indeo to [MediaDest]\video\indeo
  757.             *.*
  758.         EndCopyFiles
  759.     EndIf
  760.     If [Number7] > 0
  761.         CopyFiles from [InstallFromDrive]:[MediaRoot]\morphs to [MediaDest]\morphs
  762.             *.*
  763.         EndCopyFiles
  764.     EndIf
  765.     If [Number8] > 0
  766.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\present1 to [MediaDest]\scores\present
  767.             *.*
  768.         EndCopyFiles
  769.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\intermsn to [MediaDest]\scores\intermsn
  770.             *.*
  771.         EndCopyFiles
  772.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\theend1 to [MediaDest]\scores\the_end1
  773.             *.*
  774.         EndCopyFiles
  775.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\theend2 to [MediaDest]\scores\the_end2
  776.             *.*
  777.         EndCopyFiles
  778.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\btmline to [MediaDest]\scores\btmline
  779.             *.*
  780.         EndCopyFiles
  781.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\stats to [MediaDest]\scores\stats
  782.             *.*
  783.         EndCopyFiles
  784.         CopyFiles from [InstallFromDrive]:[MediaRoot]\scores\sailing to [MediaDest]\scores\sailing
  785.             *.*
  786.         EndCopyFiles
  787.     EndIf
  788. EndProcedure
  789.  
  790.  
  791. Procedure MBInstall
  792.     If FileExists [InstallFromDirectory]\mblitz\setup.exe
  793.         ShowWindow Minimized
  794.         ChangeDirectoryTo [InstallFromDirectory]\mblitz
  795.         Run [InstallFromDirectory]\mblitz\setup.exe
  796.         ChangeDirectoryTo [InstallFromDirectory]
  797.         ShowWindow Maximized
  798.     EndIf
  799. EndProcedure
  800.  
  801.  
  802. ;; This is the procedure to do the custom installation.
  803. ;; The number variables need to be initialized to the queue sizes for each
  804. ;; of the groups.  Queueing the group and calling the QueSize function is
  805. ;; the only way to do this.  It's OK, because it doesn't actually take much
  806. ;; time.  Be aware!  You cannot use an [ArrayX] variable here, only the
  807. ;; [NumberX] variable works.  You cannot get return values in an [ArrayX].
  808. ;;
  809. ;; So, the dialog box will change the values of the number variables depending
  810. ;; on whether or not the checkboxes were checked.  Unchecked buttons will
  811. ;; get 0 for a value, otherwise the queue size will be in the variables,
  812. ;; as when before the box came up.  If the user hits cancel, the values will
  813. ;; all be 0, as if they had unchecked all the boxes.
  814. ;;
  815. ;; You can, for now, have up to 10 groups.  Not many more will fit on the
  816. ;; screen in VGA.  If you need more than that, talk to me (Janet Lennon)
  817. ;; and I'll see what I can do about it.
  818. Procedure SelectForCustomSetup
  819. :Restart
  820.     QueFileGroup [Module1Groups]
  821.     QueFiles
  822.         flake.avi
  823.     EndQueFiles
  824.     [Number1] := QueSize
  825.     UnQueAllFiles
  826.     QueFileGroup [Module2Groups]
  827.     [Number2] := QueSize
  828.     UnQueAllFiles
  829.     QueFileGroup [Module3Groups]
  830.     [Number3] := QueSize
  831.     UnQueAllFiles
  832.     QueFileGroup [Module4Groups]
  833.     [Number4] := QueSize
  834.     UnQueAllFiles
  835.     QueFileGroup [Module5Groups]
  836.     [Number5] := QueSize
  837.     UnQueAllFiles
  838.     QueFileGroup [Module6Groups]
  839.     [Number6] := QueSize
  840.     UnQueAllFiles
  841.     QueFileGroup [Module8Groups]
  842.     [Number7] := QueSize
  843.     UnQueAllFiles
  844.     [Number8] := [WinVideoSize]
  845.     UnQueAllFiles
  846.     QueFileGroup [Module10Groups]
  847.     [Number9] := QueSize
  848.     UnQueAllFiles
  849.  
  850.     if [InstallationDirectory] = BlankString
  851.         ;; We'll default to c:, since in general it's pretty safe.
  852.         [InstallationDirectory] := c:[DefaultInstallationDir]
  853.     EndIf
  854.     ;; Let's remember what it was in case the user cancels.
  855.     [Dir1] := [InstallationDirectory]
  856.  
  857.     CheckBoxDialog [InstallationDirectory] @xy(Center,Center) UseHeader "Compel Setup Options"
  858.         Instructions
  859.         ;Select a destination directory and the options you want to install.
  860.         ;When you are done, press OK to continue, or Cancel to return
  861.         ;to the main menu.
  862.         [Module1Name]
  863.         ;[Number1]
  864.         [Module2Name]
  865.         ;[Number2]
  866.         [Module3Name]
  867.         ;[Number3]
  868.         [Module4Name]
  869.         ;[Number4]
  870.         [Module5Name]
  871.         ;[Number5]
  872.         [Module6Name]
  873.         ;[Number6]
  874.         [Module8Name]
  875.         ;[Number7]
  876.         [Module9Name]
  877.         ;[Number8]
  878.         [Module10Name]
  879.         ;[Number9]
  880.     EndCheckBoxDialog
  881.     If [Number1] > 0
  882.         QueFileGroup [Module1Groups]
  883.         QueFiles
  884.             flake.avi
  885.         EndQueFiles
  886.         [ExesInstalled] := YesCharacter
  887.     EndIf
  888.     If [Number2] > 0
  889.         QueFileGroup [Module2Groups]
  890.         [RuntimeInstalled] := YesCharacter
  891.     EndIf
  892.     If [Number3] > 0
  893.         QueFileGroup [Module3Groups]
  894.         [TemplatesInstalled] := YesCharacter
  895.     EndIf
  896.     If [Number4] > 0
  897.         QueFileGroup [Module4Groups]
  898.         [FormsInstalled] := YesCharacter
  899.     EndIf
  900.     If [Number5] > 0
  901.         QueFileGroup [Module5Groups]
  902.         [ColorsInstalled] := YesCharacter
  903.     EndIf
  904.     If [Number6] > 0
  905.         QueFileGroup [Module6Groups]
  906.         [MediaInstalled] := YesCharacter
  907.     EndIf
  908.     IF [Number7] > 0
  909.         QueFileGroup [Module8Groups]
  910.         [FiltersInstalled] := YesCharacter
  911.     EndIf
  912.     IF [Number9] > 0
  913.         QueFileGroup [Module10Groups]
  914.         [ToolsInstalled] := YesCharacter
  915.     EndIf
  916.     If [Number8] > 0
  917.         [DoDrivers] := YesCharacter
  918.     Else
  919.         If QueSize = 0
  920.             [InstallationDirectory] := [Dir1]
  921.             Exit
  922.         EndIf
  923. ;;                      You have unchecked the Drivers option.
  924. ;;
  925. ;;                      Asymetrix 3D F/X requires Video for Windows drivers 1.1.  If you
  926. ;;                      do not have Video for Windows 1.1 installed, Asymetrix 3D F/X
  927. ;;                      will not work correctly.
  928. ;;
  929. ;;                      Are you sure you want to do this?
  930.         MessageBox [YesOrNo1] Exclamation YesNo
  931.             You have unchecked the Drivers option.
  932.  
  933.             The Video for Windows driver enables you to play the files 
  934.             included in Compel's clip media collection.
  935.  
  936.             Are you sure you want to do this?
  937.         EndMessageBox
  938.         If [YesOrNo1] = YesCharacter
  939.             [DoDrivers] := NoCharacter
  940.         Else
  941.             Goto Restart
  942.         EndIf
  943.     EndIf
  944.     If QueSize > 0
  945.         GoTo InstallItAll
  946.     Else
  947.         If [DoDrivers] = YesCharacter
  948.             Do InstallDrivers
  949.         EndIf
  950.     EndIf
  951. EndProcedure
  952.  
  953.  
  954. ;; This procedure gets a filename from the user, should she want to install
  955. ;; just one file.  For instance, if the user plays with a sample file, and
  956. ;; then wants a new copy, or a DLL gets corrupted, this is a handy feature.
  957. Procedure GetNewCopyOfFile
  958. :StartOver
  959.     [String1] := BlankString
  960.     Dialog [String1] 12 UseHeader "File Replacement" UpperCase
  961.         Enter the name of the file you want
  962.         to replace.  Do not enter the path name.
  963.         Leave blank to exit.
  964.     EndDialog
  965.     [String9] := A[String1]
  966.     If [String9] = A
  967.         Exit
  968.     EndIf
  969.     If [String1] contains \
  970.         Popup Please enter just the file name with no path.
  971.         GoTo StartOver
  972.     EndIf
  973.     If FileIsInLibrary [String1]
  974.         QueFiles
  975.         [String1]
  976.         EndQueFiles
  977.     Else
  978.         Popup Cannot find file [String1].
  979.         GoTo StartOver
  980.     EndIf
  981.  
  982.     ;; Let's find out where Compel was installed.
  983.     ;; Value gets returned in the fifth spot.  We mark the default with said
  984.     ;; string since we can't put BlankString in the middle of the array.
  985.     ;; If we got "default" back, Compel has not yet been installed.  Otherwise,
  986.     ;; set the returned value in [InstallationDirectory] and we know the file
  987.     ;; will go to the right place.  Or, at least it will if the user hasn't
  988.     ;; moved anything.
  989.     [Array1][1] := Registered Apps
  990.     [Array1][2] := CPL20
  991.     [Array1][3] := default
  992.     [Array1][4] := [WindowsDirectory]\asym.ini
  993.     GetPrivateProfileString Using [Array1]
  994.  
  995.     [String1] := [Array1][5]
  996.     If [String1] = default
  997.         [InstallationDirectory] := C:[DefaultInstallationDir]
  998.     Else
  999.         [Number1] := PositionOf "\CPL20.EXE" in [String1]
  1000.         [Number1] := [Number1] - 1
  1001.         [InstallationDirectory] := SubstringOf [String1] from 1 to [Number1]
  1002.     EndIf
  1003.  
  1004.     DialogWithBrowse [InstallationDirectory]
  1005.         Please make sure that Setup has the correct directory 
  1006.         for your copy of [ProductName].
  1007.     EndDialogWithBrowse
  1008.  
  1009.     If [InstallationDirectory] = BlankString
  1010.         [InstallationDirectory] := [Dir1]
  1011.         UnQueAllFiles
  1012.     EndIf
  1013.  
  1014.     If QueSize > 0
  1015.         GetQuedFiles FileThermometerOnly
  1016.     EndIf
  1017.     UnQueAllFiles
  1018.     [GetOneFile] := YesCharacter
  1019.     [DoDrivers] := NoCharacter
  1020. EndProcedure
  1021.  
  1022.  
  1023. Procedure WriteCompelIni
  1024.     ;; Let's only change these if the sounds (and exes) were written in fresh.
  1025.     If ([ExesInstalled] = YesCharacter) .OR. ([RuntimeInstalled] = YesCharacter)
  1026. ;;              [Array1][1] := General
  1027. ;;              [Array1][2] := StartUpSound
  1028. ;;              [Array1][3] := [InstallationDirectory]\startup.wav
  1029. ;;              [Array1][4] := [WindowsDirectory]\cpl20.ini
  1030. ;;              WritePrivateProfileString Using [Array1]
  1031. ;;              [Array1][1] := General
  1032. ;;              [Array1][2] := ShutDownSound
  1033. ;;              [Array1][3] := [InstallationDirectory]\signoff.wav
  1034. ;;              [Array1][4] := [WindowsDirectory]\cpl20.ini
  1035. ;;              WritePrivateProfileString Using [Array1]
  1036.         [Array1][1] := General
  1037.         [Array1][2] := SuppressPresentationImport
  1038.         [Array1][3] := <NULL>
  1039.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1040.         WritePrivateProfileString Using [Array1] delete
  1041.         [Array1][1] := Directories
  1042.         [Array1][2] := Cpl
  1043.         [Array1][3] := [InstallationDirectory]
  1044.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1045.         WritePrivateProfileString Using [Array1]
  1046.         [Array1][1] := Directories
  1047.         [Array1][2] := Graphic
  1048.         [Array1][3] := [InstallationDirectory]\graphic
  1049.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1050.         WritePrivateProfileString Using [Array1]
  1051.         CreateDirectoryIfNecessary [InstallationDirectory]\graphic
  1052.         [Array1][1] := Directories
  1053.         [Array1][2] := Chart
  1054.         [Array1][3] := [InstallationDirectory]\chart
  1055.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1056.         WritePrivateProfileString Using [Array1]
  1057.         CreateDirectoryIfNecessary [InstallationDirectory]\chart
  1058.         [Array1][1] := Directories
  1059.         [Array1][2] := Forms
  1060.         [Array1][3] := [InstallationDirectory]\forms
  1061.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1062.         WritePrivateProfileString Using [Array1]
  1063.     EndIf
  1064.     If [UserName] <> BlankString
  1065.         [Array1][1] := User Information
  1066.         [Array1][2] := Name
  1067.         [Array1][3] := [UserName]
  1068.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1069.         WritePrivateProfileString Using [Array1]
  1070.     EndIf
  1071.     If [Organization] <> BlankString
  1072.         [Array1][1] := User Information
  1073.         [Array1][2] := Organization
  1074.         [Array1][3] := [Organization]
  1075.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1076.         WritePrivateProfileString Using [Array1]
  1077.     EndIf
  1078.     If [MediaInstalled] = YesCharacter
  1079.         [Array1][1] := Clips
  1080.         [Array1][2] := default
  1081.         [Array1][3] := [InstallationDirectory]\media\default.cpf
  1082.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1083.         WritePrivateProfileString Using [Array1]
  1084.         [Array1][1] := Directories
  1085.         [Array1][2] := Clipart
  1086.         [Array1][3] := [InstallationDirectory]\clipart
  1087.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1088.         WritePrivateProfileString Using [Array1]
  1089.         [Array1][1] := Directories
  1090.         [Array1][2] := Media
  1091.         [Array1][3] := [InstallationDirectory]\media
  1092.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1093.         WritePrivateProfileString Using [Array1]
  1094.     EndIf
  1095.     If [TemplatesInstalled] = YesCharacter
  1096.         [Array1][1] := Template
  1097.         [Array1][2] := Template
  1098.         [Array1][3] := [InstallationDirectory]\template\default.tpl
  1099.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1100.         WritePrivateProfileString Using [Array1]
  1101.         [Array1][1] := Directories
  1102.         [Array1][2] := Template
  1103.         [Array1][3] := [InstallationDirectory]\template
  1104.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1105.         WritePrivateProfileString Using [Array1]
  1106.     EndIf
  1107.     If [ColorsInstalled] = YesCharacter
  1108.         [Array1][1] := Directories
  1109.         [Array1][2] := Color
  1110.         [Array1][3] := [InstallationDirectory]\color
  1111.         [Array1][4] := [WindowsDirectory]\cpl20.ini
  1112.         WritePrivateProfileString Using [Array1]
  1113.     EndIf
  1114. EndProcedure
  1115.  
  1116.  
  1117. Procedure WriteAsymIni
  1118.     If FileExists [WindowsDirectory]\Asym.ini
  1119.         CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
  1120.             asym.ini as asym.bak
  1121.         EndCopyFiles
  1122.     EndIf
  1123.     If [ExesInstalled] = YesCharacter
  1124.         [Array1][1] := Registered Apps
  1125.         [Array1][2] := CPL20
  1126.         [Array1][3] := [InstallationDirectory]\CPL20.EXE,2.0,United States
  1127.         [Array1][4] := [WindowsDirectory]\asym.ini
  1128.         WritePrivateProfileString Using [Array1]
  1129.         [Array1][1] := Spelling
  1130.         [Array1][2] := UserDictName
  1131.         [Array1][3] := user.spl
  1132.         [Array1][4] := [WindowsDirectory]\asym.ini
  1133.         WritePrivateProfileString Using [Array1]
  1134.         [Array1][1] := Spelling
  1135.         [Array1][2] := LangDictPath
  1136.         [Array1][3] := [WindowsDirectory]\asym\spellchk
  1137.         [Array1][4] := [WindowsDirectory]\asym.ini
  1138.         WritePrivateProfileString Using [Array1]
  1139.     EndIf
  1140.     If [ToolsInstalled] = YesCharacter
  1141.         [Array1][1] := Registered Apps
  1142.         [Array1][2] := BITEDIT
  1143.         [Array1][3] := [WindowsDirectory]\asym\apps\asymbit.exe,1,United States
  1144.         [Array1][4] := [WindowsDirectory]\asym.ini
  1145.         WritePrivateProfileString Using [Array1]
  1146.         [Array1][1] := Registered Apps
  1147.         [Array1][2] := PALEDIT
  1148.         [Array1][3] := [WindowsDirectory]\asym\apps\asympal.exe,1,United States
  1149.         [Array1][4] := [WindowsDirectory]\asym.ini
  1150.         WritePrivateProfileString Using [Array1]
  1151.         [Array1][1] := Registered Apps
  1152.         [Array1][2] := WAVEEDIT
  1153.         [Array1][3] := [WindowsDirectory]\asym\apps\asymwave.exe,1,United States
  1154.         [Array1][4] := [WindowsDirectory]\asym.ini
  1155.         WritePrivateProfileString Using [Array1]
  1156.     EndIf
  1157.     If [FiltersInstalled] = YesCharacter
  1158.         [Array1][1] := Graphic Import Filters
  1159.         [Array1][2] := CGM (*.cgm)
  1160.         [Array1][3] := [WindowsDirectory]\asym\filters\imcgm9.flt,cgm
  1161.         [Array1][4] := [WindowsDirectory]\asym.ini
  1162.         WritePrivateProfileString Using [Array1]
  1163.         [Array1][1] := Graphic Import Filters
  1164.         [Array1][2] := Micrografx DRAW! (*.drw)
  1165.         [Array1][3] := [WindowsDirectory]\asym\filters\imdrw9.flt,drw
  1166.         [Array1][4] := [WindowsDirectory]\asym.ini
  1167.         WritePrivateProfileString Using [Array1]
  1168.         [Array1][1] := Graphic Import Filters
  1169.         [Array1][2] := AutoCAD DXF (*.dxf)
  1170.         [Array1][3] := [WindowsDirectory]\asym\filters\imdxf9.flt,dxf
  1171.         [Array1][4] := [WindowsDirectory]\asym.ini
  1172.         WritePrivateProfileString Using [Array1]
  1173.         [Array1][1] := Graphic Import Filters
  1174.         [Array1][2] := Adobe Illustrator (*.ai)
  1175.         [Array1][3] := [WindowsDirectory]\asym\filters\imps_9.flt,ai
  1176.         [Array1][4] := [WindowsDirectory]\asym.ini
  1177.         WritePrivateProfileString Using [Array1]
  1178.         [Array1][1] := Graphic Import Filters
  1179.         [Array1][2] := Postscript (*.eps)
  1180.         [Array1][3] := [WindowsDirectory]\asym\filters\imps_9.flt,eps
  1181.         [Array1][4] := [WindowsDirectory]\asym.ini
  1182.         WritePrivateProfileString Using [Array1]
  1183.         [Array1][1] := Graphic Import Filters
  1184.         [Array1][2] := CompuServe GIF (*.gif)
  1185.         [Array1][3] := [WindowsDirectory]\asym\filters\ibgif9.flt,gif
  1186.         [Array1][4] := [WindowsDirectory]\asym.ini
  1187.         WritePrivateProfileString Using [Array1]
  1188.         [Array1][1] := Graphic Import Filters
  1189.         [Array1][2] := JPEG / JFIF (*.JPG)
  1190.         [Array1][3] := [WindowsDirectory]\asym\filters\ibjpg9.flt,jpg
  1191.         [Array1][4] := [WindowsDirectory]\asym.ini
  1192.         WritePrivateProfileString Using [Array1]
  1193.         [Array1][1] := Graphic Import Filters
  1194.         [Array1][2] := Macintosh PICT (*.pct)
  1195.         [Array1][3] := [WindowsDirectory]\asym\filters\impct9.flt,pct
  1196.         [Array1][4] := [WindowsDirectory]\asym.ini
  1197.         WritePrivateProfileString Using [Array1]
  1198.         [Array1][1] := Graphic Import Filters
  1199.         [Array1][2] := PC Paintbrush (*.pcx)
  1200.         [Array1][3] := [WindowsDirectory]\asym\filters\ibpcx9.flt,pcx
  1201.         [Array1][4] := [WindowsDirectory]\asym.ini
  1202.         WritePrivateProfileString Using [Array1]
  1203.         [Array1][1] := Graphic Import Filters
  1204.         [Array1][2] := Lotus Picture (*.pic)
  1205.         [Array1][3] := [WindowsDirectory]\asym\filters\impic9.flt,pic
  1206.         [Array1][4] := [WindowsDirectory]\asym.ini
  1207.         WritePrivateProfileString Using [Array1]
  1208.         [Array1][1] := Graphic Import Filters
  1209.         [Array1][2] := Tagged Image File (*.tif)
  1210.         [Array1][3] := [WindowsDirectory]\asym\filters\ibtif9.flt,tif
  1211.         [Array1][4] := [WindowsDirectory]\asym.ini
  1212.         WritePrivateProfileString Using [Array1]
  1213.         [Array1][1] := Graphic Import Filters
  1214.         [Array1][2] := Bitmap (*.bmp)
  1215.         [Array1][3] := [WindowsDirectory]\asym\filters\ibbmp9.flt,bmp
  1216.         [Array1][4] := [WindowsDirectory]\asym.ini
  1217.         WritePrivateProfileString Using [Array1]
  1218.         [Array1][1] := Graphic Import Filters
  1219.         [Array1][2] := Corel Draw (*.cdr)
  1220.         [Array1][3] := [WindowsDirectory]\asym\filters\imcdr9.flt,cdr
  1221.         [Array1][4] := [WindowsDirectory]\asym.ini
  1222.         WritePrivateProfileString Using [Array1]
  1223.         [Array1][1] := Graphic Import Filters
  1224.         [Array1][2] := DIB (*.dib)
  1225.         [Array1][3] := [WindowsDirectory]\asym\filters\ibbmp9.flt,dib
  1226.         [Array1][4] := [WindowsDirectory]\asym.ini
  1227.         WritePrivateProfileString Using [Array1]
  1228. ;;              [Array1][1] := Graphic Import Filters
  1229. ;;              [Array1][2] := Harvard Graphics 2.3 (*.cht)
  1230. ;;              [Array1][3] := [WindowsDirectory]\asym\filters\imhg29.flt,cht
  1231. ;;             [Array1][4] := [WindowsDirectory]\asym.ini
  1232. ;;              WritePrivateProfileString Using [Array1]
  1233. ;;              [Array1][1] := Graphic Import Filters
  1234. ;;             [Array1][2] := Harvard Graphics 2.3 Symbol (*.sym)
  1235. ;;              [Array1][3] := [WindowsDirectory]\asym\filters\imhg29.flt,sym
  1236. ;;              [Array1][4] := [WindowsDirectory]\asym.ini
  1237. ;;             WritePrivateProfileString Using [Array1]
  1238. ;;              [Array1][1] := Graphic Import Filters
  1239. ;;              [Array1][2] := Harvard Graphics 3 (*.ch3)
  1240. ;;              [Array1][3] := [WindowsDirectory]\asym\filters\imhg39.flt,ch3
  1241. ;;              [Array1][4] := [WindowsDirectory]\asym.ini
  1242. ;;              WritePrivateProfileString Using [Array1]
  1243. ;;              [Array1][1] := Graphic Import Filters
  1244. ;;              [Array1][2] := Harvard Graphics 3 Symbol (*.sy3)
  1245. ;;              [Array1][3] := [WindowsDirectory]\asym\filters\imhg39.flt,sy3
  1246. ;;              [Array1][4] := [WindowsDirectory]\asym.ini
  1247. ;;              WritePrivateProfileString Using [Array1]
  1248.     EndIf
  1249. EndProcedure
  1250.  
  1251.  
  1252. Procedure WriteWinIni
  1253.     ;; If we'll be writing cplshow as the exe of choice, let's make sure
  1254.     ;; compel.exe hasn't already been written in.  And if it has, we'll
  1255.     ;; make sure the file is still there.
  1256.     If [ExesInstalled] = YesCharacter
  1257.         CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
  1258.             win.ini as win.bak
  1259.         EndCopyFiles
  1260.         [Dir1] := [InstallationDirectory]\cpl20.exe
  1261.         [Array1][1] := Extensions
  1262.         [Array1][2] := art
  1263.         [Array1][3] := [Dir1] -a ^.art
  1264.         WriteProfileString Using [Array1]
  1265.         [Array1][1] := Extensions
  1266.         [Array1][2] := pkg
  1267.         [Array1][3] := [InstallationDirectory]\cpl20upk.exe ^.pkg
  1268.         WriteProfileString Using [Array1]
  1269.         [Array1][1] := Extensions
  1270.         [Array1][2] := cpl
  1271.         [Array1][3] := [Dir1] ^.cpl
  1272.         WriteProfileString Using [Array1]
  1273.     Else
  1274.         If [RuntimeInstalled] = YesCharacter
  1275.             [Array1][1] := Extensions
  1276.             [Array1][2] := cpl
  1277.             [Array1][3] := default
  1278.             GetProfileString Using [Array1]
  1279.             [String1] := [Array1][4]
  1280.             If [String1] = default
  1281.                 [Dir1] := [InstallationDirectory]\cpl20shw.exe
  1282.             Else
  1283.                 [Number1] := PositionOf "^.cpl" in [String1]
  1284.                 [Number1] := [Number1] - 2
  1285.                 [String2] := SubstringOf [String1] from 1 to [Number1]
  1286.                 If FileExists [String2]
  1287.                     Exit
  1288.                 Else
  1289.                     [Dir1] := [InstallationDirectory]\cpl20shw.exe
  1290.                 EndIf
  1291.             EndIf
  1292.             [Array1][1] := Extensions
  1293.             [Array1][2] := cpl
  1294.             [Array1][3] := [Dir1] ^.cpl
  1295.             WriteProfileString Using [Array1]
  1296.         EndIf
  1297.     EndIf
  1298. EndProcedure
  1299.  
  1300.  
  1301. Procedure WriteDriverInfo
  1302.     ;; AutoDesk driver strings
  1303.     [Array1][1] := mci extensions
  1304.     [Array1][2] := fli
  1305.     [Array1][3] := Autodesk
  1306.     WriteProfileString Using [Array1]
  1307.     [Array1][1] := mci extensions
  1308.     [Array1][2] := flc
  1309.     [Array1][3] := Autodesk
  1310.     WriteProfileString Using [Array1]
  1311.     [Array1][1] := mci
  1312.     [Array1][2] := Autodesk
  1313.     [Array1][3] := mciaap.drv
  1314.     [Array1][4] := [WindowsDirectory]\system.ini
  1315.     WritePrivateProfileString Using [Array1]
  1316. EndProcedure
  1317.  
  1318.  
  1319. Procedure BuildProgmanGroup
  1320.     [String1] := ShadowDirectory
  1321.     ProgramManagerDDE
  1322.         CreateGroup("Asymetrix Compel 2.0", "cpl20.grp")
  1323.         ShowGroup("Asymetrix Compel 2.0")
  1324.     EndProgramManagerDDE
  1325.  
  1326.     If [ExesInstalled] = YesCharacter
  1327.         ProgramManagerDDE
  1328.             ReplaceItem("Asymetrix Compel")
  1329.             AddItem([InstallationDirectory]\cpl20.exe,"Asymetrix Compel",[InstallationDirectory]\cpl20.exe,0,-1,-1,[InstallationDirectory])
  1330.             ReplaceItem("Asymetrix Compel Unpackage")
  1331.             AddItem([InstallationDirectory]\cpl20upk.exe,"Asymetrix Compel Unpackage",[InstallationDirectory]\cpl20upk.exe,0,-1,-1,[InstallationDirectory])
  1332.             ReplaceItem("Asymetrix Compel Help")
  1333.             AddItem([InstallationDirectory]\cpl20.hlp,"Asymetrix Compel Help",[WindowsDirectory]\winhelp.exe,0,-1,-1,[InstallationDirectory])
  1334.         EndProgramManagerDDE
  1335.     EndIf
  1336.     If [RuntimeInstalled] = YesCharacter
  1337.         ProgramManagerDDE
  1338.             ReplaceItem("Asymetrix Compel Show")
  1339.             AddItem([InstallationDirectory]\cpl20shw.exe,"Asymetrix Compel Show",[InstallationDirectory]\cpl20shw.exe,4,-1,-1,[InstallationDirectory])
  1340.         EndProgramManagerDDE
  1341.     EndIf
  1342.     If ([ExesInstalled] = YesCharacter) .OR. ([RuntimeInstalled] = YesCharacter)
  1343.         ProgramManagerDDE
  1344.             ReplaceItem("Remove Asymetrix Compel")
  1345.             AddItem([InstallationDirectory]\uninstal.exe,"Remove Asymetrix Compel",[InstallationDirectory]\uninstal.exe,0,-1,-1,[String1])
  1346.         EndProgramManagerDDE
  1347.     EndIf
  1348.     If [ToolsInstalled] = YesCharacter
  1349.         ProgramManagerDDE
  1350.             ReplaceItem("Bit Edit")
  1351.             AddItem([WindowsDirectory]\asym\apps\asymbit.exe, "Bit Edit", [WindowsDirectory]\asym\apps\asymbit.exe, 0, -1, -1, [InstallationDirectory])
  1352.             ReplaceItem("Pal Edit")
  1353.             AddItem([WindowsDirectory]\asym\apps\asympal.exe, "Pal Edit", [WindowsDirectory]\asym\apps\asympal.exe, 0, -1, -1, [InstallationDirectory])
  1354.             ReplaceItem("Wave Edit")
  1355.             AddItem([WindowsDirectory]\asym\apps\asymwave.exe, "Wave Edit", [WindowsDirectory]\asym\apps\asymwave.exe, 0, -1, -1, [InstallationDirectory])
  1356.         EndProgramManagerDDE
  1357.     EndIf
  1358. EndProcedure
  1359.  
  1360.  
  1361. Procedure CleanWinIni
  1362.     [Array1][1] := Extensions
  1363.     [Array1][2] := cpl
  1364.     [Array1][3] := <NULL>
  1365.     WriteProfileString Using [Array1] delete
  1366.     [Array1][1] := Extensions
  1367.     [Array1][2] := art
  1368.     [Array1][3] := <NULL>
  1369.     WriteProfileString Using [Array1] delete
  1370.     [Array1][1] := Extensions
  1371.     [Array1][2] := pkg
  1372.     [Array1][3] := <NULL>
  1373.     WriteProfileString Using [Array1] delete
  1374. EndProcedure
  1375.  
  1376.  
  1377. ;; Here we read a lot of stuff out of the data file.  This sets up strings
  1378. ;; for installation and some boolean variables so we can test the system.
  1379. Procedure SetupInstalit
  1380.     SetBackupModeTo BAK
  1381.     SetCoordinatesTo pixel
  1382.     SetScreenAttrTo [ScreenColors]
  1383.     LoadBitMap 1 [InstallFromDirectory]\SETUP.BMP
  1384.     LoadBitMap 2 [InstallFromDirectory]\COPYCMPL.BMP
  1385.     ShowBitMap 2
  1386.  
  1387.     ;; These are a matter of taste.  Creative services should decide about
  1388.     ;; these, I think.
  1389.  
  1390.     SetBackgroundColor [BackgroundColor]
  1391.     ;; SetDithering Off
  1392.  
  1393.     ShowWindow Maximized
  1394.     ClearScreen
  1395.  
  1396.     If FileExists [InstallFromDirectory]\[SDFFileName]
  1397. ;;        LoadBitMap 3 [InstallFromDirectory]\one.bmp
  1398. ;;        LoadBitMap 4 [InstallFromDirectory]\two.bmp
  1399. ;;        LoadBitMap 5 [InstallFromDirectory]\three.bmp
  1400. ;;        LoadBitMap 6 [InstallFromDirectory]\four.bmp
  1401. ;;        LoadBitMap 7 [InstallFromDirectory]\five.bmp
  1402. ;;        LoadBitMap 8 [InstallFromDirectory]\six.bmp
  1403. ;;        LoadBitMap 9 [InstallFromDirectory]\seven.bmp
  1404. ;;        LoadBitMap 10 [InstallFromDirectory]\eight.bmp
  1405.         If MaxX = 640
  1406.             [Number1] := 85
  1407.         EndIf
  1408.         If MaxX = 1024
  1409.             [Number1] := 240
  1410.         EndIf
  1411.         If MaxX = 800
  1412.             [Number1] := 150
  1413.         EndIf
  1414.         TextBox @xy(Center,[Number1])
  1415.             Getting custom information...one moment, please.
  1416.         EndTextBox
  1417.         ExamineTextFile [InstallFromDirectory]\[SDFFileName]
  1418.  
  1419.         [InquireSysFileLocation] := SettingFor InquireSysFileLocation
  1420.         If [InquireSysFileLocation] = NoCharacter
  1421.             NoSysFileConfirmation
  1422.         EndIf
  1423.  
  1424.         ;; These need to be done early.
  1425.         [ProductName] := SettingFor ProductName
  1426.         [DefaultTitle] := SettingFor DefaultTitle
  1427.  
  1428.         [PopupBorder] := SettingFor PopupBorder
  1429.         [ModifyMode] := SettingFor ModifyMode
  1430.         SetPopupBorderTo [PopupBorder]
  1431.         SetModifyModeTo [ModifyMode]
  1432.         SetShadowAttrTo DarkGrayOnBlack
  1433.  
  1434.         [CDInstall]                                     := SettingFor CDInstall
  1435.         [CompanyName]                           := SettingFor CompanyName
  1436.         [Module1Name]                           := SettingFor Module1Name
  1437.         [Module1Groups]                         := SettingFor Module1Groups
  1438.         [Module2Name]                           := SettingFor Module2Name
  1439.         [Module2Groups]                         := SettingFor Module2Groups
  1440.         [Module2aGroups]                        := SettingFor Module2aGroups
  1441.         [Module3Name]                           := SettingFor Module3Name
  1442.         [Module3Groups]                         := SettingFor Module3Groups
  1443.         [Module4Name]                           := SettingFor Module4Name
  1444.         [Module4Groups]                         := SettingFor Module4Groups
  1445.         [Module5Name]                           := SettingFor Module5Name
  1446.         [Module5Groups]                         := SettingFor Module5Groups
  1447.         [Module6Name]                           := SettingFor Module6Name
  1448.         [Module6Groups]                         := SettingFor Module6Groups
  1449.         [Module7Name]                           := SettingFor Module7Name
  1450.         [Module7Groups]                         := SettingFor Module7Groups
  1451.         [Module8Name]                           := SettingFor Module8Name
  1452.         [Module8Groups]                         := SettingFor Module8Groups
  1453.         [Module9Name]                           := SettingFor Module9Name
  1454.         [Module9Groups]                         := SettingFor Module9Groups
  1455.         [Module10Name]                           := SettingFor Module10Name
  1456.         [Module10Groups]                         := SettingFor Module10Groups
  1457.         [MediaGroup1]                           := SettingFor MediaGroup1
  1458.         [MediaGroup2]                           := SettingFor MediaGroup2
  1459.         [MediaGroup3]                           := SettingFor MediaGroup3
  1460.         [MediaGroup4]                           := SettingFor MediaGroup4
  1461.         [MediaGroup5]                           := SettingFor MediaGroup5
  1462.         [MediaGroup6]                           := SettingFor MediaGroup6
  1463.         [MediaGroup7]                           := SettingFor MediaGroup7
  1464.         [MediaGroup8]                           := SettingFor MediaGroup8
  1465.         [MediaGroup9]                           := SettingFor MediaGroup9
  1466.         [MediaSize1]                            := SettingFor MediaSize1
  1467.         [MediaSize2]                            := SettingFor MediaSize2
  1468.         [MediaSize3]                            := SettingFor MediaSize3
  1469.         [MediaSize4]                            := SettingFor MediaSize4
  1470.         [MediaSize5]                            := SettingFor MediaSize5
  1471.         [MediaSize6]                            := SettingFor MediaSize6
  1472.         [MediaSize7]                            := SettingFor MediaSize7
  1473.         [MediaSize8]                            := SettingFor MediaSize8
  1474.         [MediaSize9]                            := SettingFor MediaSize9
  1475.         [AutodeskGroup]                         := SettingFor AutodeskGroup
  1476.         [InstallingVersion]                     := SettingFor InstallingVersion
  1477.         [InstallingLanguage]            := SettingFor InstallingLanguage
  1478.         [FullDesc]                                      := SettingFor FullDesc
  1479.         [FullDesc2]                                     := SettingFor FullDesc2
  1480.         [CustomDesc]                            := SettingFor CustomDesc
  1481.         [CustomDesc2]                           := SettingFor CustomDesc2
  1482.         [ReplaceDesc]                           := SettingFor ReplaceDesc
  1483.         [MediaRoot]                                     := SettingFor MediaRoot
  1484.         [MediaClipText]                         := SettingFor MediaClipText
  1485.         [MBInstText]                            := SettingFor MBInstText
  1486.         [ExtractionOptions]                     := SettingFor ExtractionOptions
  1487.         [ReadmeFileName]                        := SettingFor ReadmeFileName
  1488.         [AskBeforeFileReplace]          := SettingFor AskBeforeFileReplace
  1489.         [MinimumOSVersion]                      := SettingFor MinimumOSVersion
  1490.         [DOS401]                                        := SettingFor DOS401
  1491.         [MinimumWinVersion]                     := SettingFor MinimumWinVersion
  1492.         [WinVideoSize]                          := SettingFor WinVideoSize
  1493.         [OLESize]                                       := SettingFor OLESize
  1494.         [AllowCGA]                                      := SettingFor AllowCGA
  1495.         [AllowEGA]                                      := SettingFor AllowEGA
  1496.         [AllowMDA]                                      := SettingFor AllowMDA
  1497.         [Allow808x]                                     := SettingFor Allow808X
  1498.         [Allow80286]                            := SettingFor Allow80286
  1499.         [MathCoproRecommended]          := SettingFor MathCoproRecommended
  1500.         [FixedDiskRequired]                     := SettingFor FixedDiskRequired
  1501.         [NetworkInstallation]           := SettingFor NetworkInstallation
  1502.         [MinMemRequiredPresent]         := SettingFor MinMemRequiredPresent
  1503.         [MinExtMemoryRequired]          := SettingFor MinExtMemoryRequired
  1504.         [DefaultInstallationDir]        := SettingFor DefaultInstallationDir
  1505.         [OLE2ver]                                       := SettingFor OLE2ver
  1506.         [OLE2NLSver]                            := SettingFor OLE2NLSver
  1507.         [OLE2DISPver]                           := SettingFor OLE2DISPver
  1508.         [OLE2PROXver]                           := SettingFor OLE2PROXver
  1509.         [OLE2CONVver]                           := SettingFor OLE2CONVver
  1510.         [COMPOBJver]                            := SettingFor COMPOBJver
  1511.         [STORAGEver]                            := SettingFor STORAGEver
  1512.         [TYPELIBver]                            := SettingFor TYPELIBver
  1513.         ClearScreen  ;; get rid of textbox
  1514.         ForgetTextFile
  1515.         UnqueAllFiles
  1516.         QueFileGroup [Module8Groups]
  1517.         [FilterSize] := QueSize
  1518.         UnqueAllFiles
  1519.     Else
  1520.         Popup Script Data File [SDFFileName] is missing.  Cannot continue.
  1521.         UnloadBitmap 1
  1522.         SoLong Quietly
  1523.     EndIf
  1524.  
  1525. EndProcedure
  1526.  
  1527.  
  1528. ;; Here we do cleanup.  If we installed anything, we modify config.sys and
  1529. ;; autoexec.bat if necessary.  We offer to run our product and offer to
  1530. ;; browse the readme.txt.
  1531. Procedure ExitInstallation
  1532.     ClearScreen
  1533.     If [Installed] = YesCharacter
  1534.  
  1535.         [YesOrNo1] := NoCharacter
  1536.         [String1] := Setup made a backup of your:
  1537.         [String2] := BlankString
  1538.         [String3] := BlankString
  1539.         [String4] := BlankString
  1540.         If [ASYMini] = YesCharacter
  1541.             [String2] := "    ASYM.INI file named ASYMINI.OLD"
  1542.             [YesOrNo1] := YesCharacter
  1543.         EndIf
  1544.         If [ISGDI9dll] = YesCharacter
  1545.             [String3] := "    ISGDI9.DLL file named ISGDI9DL.OLD"
  1546.             [YesOrNo1] := YesCharacter
  1547.         EndIf
  1548.         If [ISGDI9ini] = YesCharacter
  1549.             [String4] := "    ISGDI9.INI file named ISGDI9IN.OLD"
  1550.             [YesOrNo1] := YesCharacter
  1551.         EndIf
  1552.  
  1553.         If [YesOrNo1] = YesCharacter
  1554.             Dialog UseHeader "[DefaultTitle]"
  1555.                 [String1]
  1556.  
  1557.                 [String2]
  1558.                 [String3]
  1559.                 [String4]
  1560.             EndDialog
  1561.         EndIf
  1562.  
  1563.         If [Modified] = YesCharacter
  1564.             [String9] := A[AModified]
  1565.             If [String9] = A
  1566.                 [String1] := [CModified]
  1567.             Else
  1568.                 [String9] := A[CModified]
  1569.                 If [String9] <> A
  1570.                     [String1] := [AModified] and [CModified]
  1571.                 Else
  1572.                     [String1] := [AModified]
  1573.                 EndIf
  1574.             EndIf
  1575.             MessageBox Information
  1576.                 Installation is complete.
  1577.                 Setup modified [String1].
  1578.                 You must reboot your computer before using Compel.
  1579.             EndMessageBox
  1580.         Else
  1581.             MessageBox Information ;; Final Farewell
  1582.                 Installation is complete.
  1583.                 You must restart Windows before
  1584.                 using Compel.
  1585.             EndMessageBox
  1586.         EndIf
  1587.  
  1588. ;;              If [ReadmeFileName] <> BlankString
  1589. ;;                      MessageBox [YesOrNo1] YesNo Question ;; Ask whether to browse readme file, if any
  1590. ;;                              [ReadmeFileName] contains important information.
  1591. ;;                              Do you wish to read it now?
  1592. ;;                      EndMessageBox
  1593. ;;                      If [YesOrNo1] = YesCharacter
  1594. ;;                If FileExists [InstallationDirectory]\readme.wri
  1595. ;;                    Run [WindowsDirectory]\write.exe [InstallationDirectory]\readme.wri NoWait
  1596. ;;                EndIf
  1597. ;;                      EndIf
  1598. ;;              EndIf
  1599.  
  1600.     EndIf
  1601.  
  1602.     Do SimpleExit
  1603. EndProcedure
  1604.  
  1605.  
  1606. ;; System summary - change with care.
  1607. Procedure ShowSystemSummary
  1608.     Dialog PressAKey
  1609.         HERE IS A SUMMARY OF YOUR SYSTEM
  1610.         [String8]  ;; notes whether any incompatibilities were found
  1611.  
  1612.         Operating System Version:  [OSVersionSummary]
  1613.         Windows Version:  [WinVersionSummary]
  1614.         CPU Type:  [CPUTypeSummary]
  1615.         Display Adapter:  [DisplayAdapterSummary]
  1616.         Math Coprocessor:  [MathCoprocessorStatus]
  1617.         Main Memory Present:  [SystemMemorySummary]
  1618.         Extended Memory Present:  [ExtMemorySummary]
  1619.         Installation Drive:  [InstDriveSummary]
  1620.         Network:  [NetworkActive]
  1621.         [String9]  ;; information about network suitability
  1622.     EndDialog
  1623. EndProcedure
  1624.  
  1625.  
  1626. Procedure PrepareSystemReport
  1627.     [InsufficientSystem] := NoCharacter
  1628.     If OSVersion < [MinimumOSVersion]
  1629.         [OSVersionSummary] := OSVersion (need at least [MinimumOSVersion])
  1630.         [InsufficientSystem] := YesCharacter
  1631.     Else
  1632.         [OSVersionSummary] := OSVersion
  1633.     EndIf
  1634.     If WindowsVersion < [MinimumWinVersion]
  1635.         [WinVersionSummary] := WindowsVersion (need at least [MinimumWinVersion])
  1636.         [InsufficientSystem] := YesCharacter
  1637.     Else
  1638.         [WinVersionSummary] := WindowsVersion
  1639.     EndIf
  1640.     If ExtendedMemoryPresent < [MinExtMemoryRequired]
  1641.         [ExtMemorySummary] := ExtendedMemoryPresentK (need at least [MinExtMemoryRequired]K)
  1642.         [InsufficientSystem] := YesCharacter
  1643.     Else
  1644.         [ExtMemorySummary] := ExtendedMemoryPresentK
  1645.     EndIf
  1646.     If MainMemoryPresent < [MinMemRequiredPresent]
  1647.         [SystemMemorySummary] := MainMemoryK (need at least [MinMemRequiredPresent]K)
  1648.         [InsufficientSystem] := YesCharacter
  1649.     Else
  1650.         [SystemMemorySummary] := MainMemoryK
  1651.     EndIf
  1652.     If 808X
  1653.         If [Allow808X] = YesCharacter
  1654.             [CPUTypeSummary] := 808x
  1655.         Else
  1656.             [CPUTypeSummary] := 808x (not compatible with [ProductName])
  1657.             [InsufficientSystem] := YesCharacter
  1658.         EndIf
  1659.     EndIf
  1660.     If 80286
  1661.         If [Allow80286] = YesCharacter
  1662.             [CPUTypeSummary] := 80286
  1663.         Else
  1664.             [CPUTypeSummary] := 80286 (not compatible with [ProductName])
  1665.             [InsufficientSystem] := YesCharacter
  1666.         EndIf
  1667.     EndIf
  1668.     If 80386
  1669.         [CPUTypeSummary] := 80386
  1670.     EndIf
  1671.     If 80486
  1672.         [CPUTypeSummary] := 80486
  1673.     EndIf
  1674.     If [CPUTypeSummary] = BlankString
  1675.         [CPUTypeSummary] := 808x
  1676.     EndIf
  1677.     If MicroChannel
  1678.         [CPUTypeSummary] := [CPUTypeSummary] (in MicroChannel Architecture)
  1679.     Else
  1680.         [CPUTypeSummary] := [CPUTypeSummary] (ISA or EISA Architecture)
  1681.     EndIf
  1682.     If CGA
  1683.         If [AllowCGA] = YesCharacter
  1684.             [DisplayAdapterSummary] := CGA
  1685.         Else
  1686.             [DisplayAdapterSummary] := CGA (not compatible with [ProductName])
  1687.             [InsufficientSystem] := YesCharacter
  1688.         EndIf
  1689.     EndIf
  1690.     If EGA
  1691.         If [AllowEGA] = YesCharacter
  1692.             [DisplayAdapterSummary] := EGA
  1693.         Else
  1694.             [DisplayAdapterSummary] := EGA (not compatible with [ProductName])
  1695.             [InsufficientSystem] := YesCharacter
  1696.         EndIf
  1697.     EndIf
  1698.     If MDA
  1699.         If [AllowMDA] = YesCharacter
  1700.             [DisplayAdapterSummary] := MDA
  1701.         Else
  1702.             [DisplayAdapterSummary] := MDA (not compatible with [ProductName])
  1703.             [InsufficientSystem] := YesCharacter
  1704.         EndIf
  1705.     EndIf
  1706.     If VGA
  1707.         [DisplayAdapterSummary] := VGA
  1708.     EndIf
  1709.     If HGC
  1710.         [DisplayAdapterSummary] := HGC
  1711.     EndIf
  1712.     If HGCPlus
  1713.         [DisplayAdapterSummary] := HGC Plus
  1714.     EndIf
  1715.     If Network
  1716.         [NetworkActive] := Network Active
  1717.     Else
  1718.         [NetworkActive] := No Network Active
  1719.     EndIf
  1720.     If NovellLoaded
  1721.         [NetworkActive] := Novell [NetworkActive]
  1722.     EndIf
  1723.     If [InstallationDirectory] <> BlankString
  1724.         [InstDriveSummary] := InstallationDrive (FreeSpaceOnDrive InstallationDrive bytes free)
  1725.     Else
  1726.         [InstDriveSummary] := (Not Selected)
  1727.     EndIf
  1728.     If MathCoprocessorPresent
  1729.         [MathCoprocessorStatus] := Present
  1730.     Else
  1731.         If [MathCoproRecommended] = YesCharacter
  1732.             [MathCoprocessorStatus] := Not Present But Recommended
  1733.             If [CompatNoticeGiven] = YesCharacter
  1734.             Else
  1735.                 Dialog UseHeader "[DefaultTitle]"  ;; Notice if math coprocessor recommended
  1736.                     [ProductName] needs a math coprocessor
  1737.                     for best performance.  Your system does not
  1738.                     contain one.
  1739.                 EndDialog
  1740.             EndIf
  1741.         Else
  1742.             [MathCoprocessorStatus] := Not Present
  1743.         EndIf
  1744.     EndIf
  1745.  
  1746.     If [InsufficientSystem] = YesCharacter
  1747.         [String8] := (Please note the listed incompatibilities)
  1748.     EndIf
  1749.     If [NetworkInstallation] contains DisallowNetwork
  1750.         [String9] := "   (You cannot install this version on a network drive)"
  1751.     EndIf
  1752.     [CompatNoticeGiven] := YesCharacter
  1753. EndProcedure
  1754.  
  1755.  
  1756. Procedure BetaSave
  1757.  
  1758.     If FileExists [WindowsDirectory]\asym.ini
  1759.         If FileExists [WindowsDirectory]\asymini.old
  1760.         Else
  1761.             CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
  1762.                 asym.ini as asymini.old
  1763.             EndCopyFiles
  1764.             [ASYMini] := YesCharacter
  1765.         EndIf
  1766.     EndIf
  1767.  
  1768.     If FileExists [WindowsDirectory]\isgdi9.ini
  1769.         If FileExists [WindowsDirectory]\isgdi9in.old
  1770.         Else
  1771.             CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
  1772.                 isgdi9.ini as isgdi9in.old
  1773.             EndCopyFiles
  1774.             [ISGDI9ini] := YesCharacter
  1775.         EndIf
  1776.     EndIf
  1777.  
  1778.     If FileExists [WindowsDirectory]\isgdi9.dll
  1779.         If FileExists [WindowsDirectory]\isgdi9dl.old
  1780.         Else
  1781.             CopyFiles from [WindowsDirectory] to [WindowsDirectory] Quietly
  1782.                 isgdi9.dll as isgdi9dl.old
  1783.             EndCopyFiles
  1784.             [ISGDI9dll] := YesCharacter
  1785.         EndIf
  1786.     EndIf
  1787.  
  1788. EndProcedure
  1789.  
  1790.  
  1791. Procedure CheckOLE
  1792.  
  1793. :CheckOLEAgain
  1794.  
  1795.     [YesOrNo1] := NoCharacter
  1796.     [String2] := BlankString
  1797.     [YesOrNo1] := IsFileInUse OLE2.DLL
  1798.     If [YesOrNo1] = YesCharacter
  1799.         [String2] := OLE2.DLL
  1800.     EndIf
  1801.     [String1] := FileVersionOf [WindowsSystemDirectory]\OLE2.DLL
  1802.     If [String1] <= [OLE2ver]
  1803.         [UpdateOLE] := YesCharacter
  1804.     EndIf
  1805.  
  1806.     [YesOrNo2] := IsFileInUse OLE2NLS.DLL
  1807.     If [YesOrNo2] = YesCharacter
  1808.         [String2] := [String2], OLE2NLS.DLL
  1809.         [YesOrNo1] := [YesOrNo2]
  1810.     EndIf
  1811.     [String1] := FileVersionOf [WindowsSystemDirectory]\OLE2NLS.DLL
  1812.     If [String1] <= [OLE2NLSver]
  1813.         [UpdateOLE] := YesCharacter
  1814.     EndIf
  1815.  
  1816.     [YesOrNo2] := IsFileInUse OLE2DISP.DLL
  1817.     If [YesOrNo2] = YesCharacter
  1818.         [String2] := [String2], OLE2DISP.DLL
  1819.         [YesOrNo1] := [YesOrNo2]
  1820.     EndIf
  1821.     [String1] := FileVersionOf [WindowsSystemDirectory]\OLE2DISP.DLL
  1822.     If [String1] <= [OLE2DISPver]
  1823.         [UpdateOLE] := YesCharacter
  1824.     EndIf
  1825.  
  1826.     [YesOrNo2] := IsFileInUse OLE2PROX.DLL
  1827.     If [YesOrNo2] = YesCharacter
  1828.         [String2] := [String2], OLE2PROX.DLL
  1829.         [YesOrNo1] := [YesOrNo2]
  1830.     EndIf
  1831.     [String1] := FileVersionOf [WindowsSystemDirectory]\OLE2PROX.DLL
  1832.     If [String1] <= [OLE2PROXver]
  1833.         [UpdateOLE] := YesCharacter
  1834.     EndIf
  1835.  
  1836.     [YesOrNo2] := IsFileInUse OLE2CONV.DLL
  1837.     If [YesOrNo2] = YesCharacter
  1838.         [String2] := [String2], OLE2CONV.DLL
  1839.         [YesOrNo1] := [YesOrNo2]
  1840.     EndIf
  1841.     [String1] := FileVersionOf [WindowsSystemDirectory]\OLE2CONV.DLL
  1842.     If [String1] <= [OLE2CONVver]
  1843.         [UpdateOLE] := YesCharacter
  1844.     EndIf
  1845.  
  1846.     [YesOrNo2] := IsFileInUse COMPOBJ.DLL
  1847.     If [YesOrNo2] = YesCharacter
  1848.         [String2] := [String2], COMPOBJ.DLL
  1849.         [YesOrNo1] := [YesOrNo2]
  1850.     EndIf
  1851.     [String1] := FileVersionOf [WindowsSystemDirectory]\COMPOBJ.DLL
  1852.     If [String1] <= [COMPOBJver]
  1853.         [UpdateOLE] := YesCharacter
  1854.     EndIf
  1855.  
  1856.     [YesOrNo2] := IsFileInUse STORAGE.DLL
  1857.     If [YesOrNo2] = YesCharacter
  1858.         [String2] := [String2], STORAGE.DLL
  1859.         [YesOrNo1] := [YesOrNo2]
  1860.     EndIf
  1861.     [String1] := FileVersionOf [WindowsSystemDirectory]\STORAGE.DLL
  1862.     If [String1] <= [STORAGEver]
  1863.         [UpdateOLE] := YesCharacter
  1864.     EndIf
  1865.  
  1866.     [YesOrNo2] := IsFileInUse TYPELIB.DLL
  1867.     If [YesOrNo2] = YesCharacter
  1868.         [String2] := [String2], TYPELIB.DLL
  1869.         [YesOrNo1] := [YesOrNo2]
  1870.     EndIf
  1871.     [String1] := FileVersionOf [WindowsSystemDirectory]\TYPELIB.DLL
  1872.     If [String1] <= [TYPELIBver]
  1873.         [UpdateOLE] := YesCharacter
  1874.     EndIf
  1875.  
  1876.     [YesOrNo2] := IsFileInUse STDOLE.TLB
  1877.     If [YesOrNo2] = YesCharacter
  1878.         [String2] := [String2], STDOLE.TLB
  1879.         [YesOrNo1] := [YesOrNo2]
  1880.     EndIf
  1881.  
  1882.     [String9] := A[String2]
  1883.     If [String9] <> A
  1884.         [Number1] := PositionOf "," in [String2]
  1885.         If [Number1] = 1
  1886.             [String2] := SubstringOf [String2] from 3 to End
  1887.         EndIf
  1888.     EndIf
  1889.  
  1890.  
  1891.     If [YesOrNo1] = YesCharacter
  1892.         SetMouseCursor Arrow
  1893.         MessageBox [YesOrNo2] OkCancel Exclamation
  1894.             Setup has detected support files in use that it must replace:
  1895.  
  1896.             [String2]
  1897.  
  1898.             Please close applications that may be using these files, such
  1899.             as Microsoft Office Manager, and click OK to continue installing, or click Cancel to quit.
  1900.         EndMessageBox
  1901.         If [YesOrNo2] = NoCharacter
  1902.             UnQueAllFiles
  1903.             Do SimpleExit
  1904.         EndIf
  1905.         Goto CheckOLEAgain
  1906.     EndIf
  1907.  
  1908. EndProcedure
  1909.  
  1910.  
  1911. Procedure CheckSpace
  1912.  
  1913.     [String1] := SubStringOf [InstallationDirectory] from 1 to 1
  1914.     [String2] := SubstringOf [WindowsDirectory] from 1 to 1
  1915.     [Number1] := FreeSpaceOnDrive [String1]
  1916.     [Number2] := FreeSpaceOnDrive [String2]
  1917.     [Number3] := QueSize
  1918.     [Number4] := 0
  1919.     If [String1] = [String2]
  1920.         If [DoDrivers] = YesCharacter
  1921.             [Number3] := [Number3] + [WinVideoSize]
  1922.             If [ExesInstalled] = YesCharacter
  1923.                 [Number3] := [Number3] - [OLESize]
  1924.             EndIf
  1925.         EndIf
  1926.     Else
  1927.         If [DoDrivers] = YesCharacter
  1928.             [Number4] := [WinVideoSize]
  1929.         EndIf
  1930.         If [ExesInstalled] = YesCharacter
  1931.             [Number3] := [Number3] - [OLESize]
  1932.             If [DoDrivers] = NoCharacter
  1933.                 [Number4] := [Number4] + [OLESize]
  1934.             EndIf
  1935.         EndIf
  1936.         If [FiltersInstalled] = YesCharacter
  1937.             [Number3] := [Number3] - [FilterSize]
  1938.             [Number4] := [Number4] + [FilterSize]
  1939.         EndIf
  1940. ;;              If [ToolsInstalled] = YesCharacter
  1941. ;;                      [Number3] := [Number3] - [ToolsSize]
  1942. ;;                      [Number4] := [Number4] + [ToolsSize]
  1943. ;;              EndIf
  1944.     EndIf
  1945.     If [Number3] > [Number1]
  1946.         MessageBox Exclamation
  1947.             There is insufficient space on drive [String1] for 
  1948.             this installation.  You must have [Number3] bytes 
  1949.             free on this drive.
  1950.         EndMessageBox
  1951.         [InstallationDirectory] := C:[DefaultInstallationDir]
  1952.         UnQueAllFiles
  1953.     EndIf
  1954.     If [Number4 > [Number2]
  1955.         MessageBox Exclamation
  1956.             There is insufficient space on drive [String2] for 
  1957.             support file installation.  You must have [Number4] 
  1958.             bytes free on this drive.
  1959.         EndMessageBox
  1960.         UnQueAllFiles
  1961.     EndIf
  1962.  
  1963. EndProcedure
  1964.  
  1965.  
  1966. Procedure BitmapQuedFiles
  1967.     [Number1] := MaxY - 180
  1968.  
  1969.     UnQueAllFiles
  1970.     HideBitmap 1
  1971.     If [ExesInstalled] = YesCharacter
  1972.         ShowBitmap 3
  1973.         QueFileGroup [Module1Groups]
  1974.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  1975.         HideBitmap 3
  1976.     EndIf
  1977.     If QueSize <> 0
  1978.         Goto BugOut
  1979.     EndIf
  1980.     If [RuntimeInstalled] = YesCharacter
  1981.         ShowBitmap 4
  1982.         If [ExesInstalled] = YesCharacter
  1983.             QueFileGroup [Module2aGroups]
  1984.         Else
  1985.             QueFileGroup [Module2Groups]
  1986.         EndIf
  1987.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  1988.         HideBitmap 4
  1989.     EndIf
  1990.     If QueSize <> 0
  1991.         Goto BugOut
  1992.     EndIf
  1993.     If [TemplatesInstalled] = YesCharacter
  1994.         ShowBitmap 5
  1995.         QueFileGroup [Module3Groups]
  1996.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  1997.         HideBitmap 5
  1998.     EndIf
  1999.     If QueSize <> 0
  2000.         Goto BugOut
  2001.     EndIf
  2002.     If [FormsInstalled] = YesCharacter
  2003.         ShowBitmap 6
  2004.         QueFileGroup [Module4Groups]
  2005.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  2006.         HideBitmap 6
  2007.     EndIf
  2008.     If QueSize <> 0
  2009.         Goto BugOut
  2010.     EndIf
  2011.     If [ColorsInstalled] = YesCharacter
  2012.         ShowBitmap 7
  2013.         QueFileGroup [Module5Groups]
  2014.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  2015.         HideBitmap 7
  2016.     EndIf
  2017.     If QueSize <> 0
  2018.         Goto BugOut
  2019.     EndIf
  2020.     If [MediaInstalled] = YesCharacter
  2021.         ShowBitmap 8
  2022.         QueFileGroup [Module6Groups]
  2023.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  2024.         HideBitmap 8
  2025.     EndIf
  2026.     If QueSize <> 0
  2027.         Goto BugOut
  2028.     EndIf
  2029.     If [TourInstalled] = YesCharacter
  2030.         ShowBitmap 9
  2031.         QueFileGroup [Module7Groups]
  2032.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  2033.         HideBitmap 9
  2034.     EndIf
  2035.     If QueSize <> 0
  2036.         Goto BugOut
  2037.     EndIf
  2038.     If [FiltersInstalled] = YesCharacter
  2039.         ShowBitmap 10
  2040.         QueFileGroup [Module8Groups]
  2041.         GetQuedFiles FileThermometerOnly @xy(Center,[Number1])
  2042.         HideBitmap 10
  2043.     EndIf
  2044. :BugOut
  2045.     ShowBitmap 1
  2046. EndProcedure
  2047.  
  2048.  
  2049. Procedure SimpleExit
  2050.  
  2051.     UnloadBitmap 1
  2052. ;;    UnloadBitmap 3
  2053. ;;    UnloadBitmap 4
  2054. ;;    UnloadBitmap 5
  2055. ;;    UnloadBitmap 6
  2056. ;;    UnloadBitmap 7
  2057. ;;    UnloadBitmap 8
  2058. ;;    UnloadBitmap 9
  2059. ;;    UnloadBitmap 10
  2060.     SoLong Quitely
  2061.  
  2062. EndProcedure
  2063.  
  2064.  
  2065. ;;This procedure eats any nonfatal dde messages.  This will stop any
  2066. ;;bogus errors coming back while installing a group or icon in ProgMan.
  2067. Procedure DDEnonFatalErrorTrap
  2068. EndProcedure
  2069.